#pragma once


// CUpDownListCtrl

class CUpDownListCtrl : public CListCtrl
{
	DECLARE_DYNAMIC(CUpDownListCtrl)
public:
	CUpDownListCtrl();
	virtual ~CUpDownListCtrl();
protected:
	int *iSortOrder_;
	int iColumn_;
    DECLARE_MESSAGE_MAP()
public:
	void OnItemDown(void);
	void OnItemUp(void);
	void MoveItem(int iSrc, int iDst);
	void OnItemBottom();
	void OnItemTop();
	afx_msg void OnLvnColumnclick(NMHDR *pNMHDR, LRESULT *pResult);
protected:
	virtual void Sort(int nSubItem);
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
public:
	BOOL DeleteItem(int nItem);
	void InsertItem(char *pszText);
	afx_msg void OnDestroy();
	void DeleteAllItem(void);
};


